Class de.bb.minissl.SslClient
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class de.bb.minissl.SslClient

Object
   |
   +----de.bb.minissl.SslClient

public final class SslClient
extends Object
Implements the client side handshake for SSL. Creates the primary hello and passes the answer either to a Ssl2 or Ssl3 client.


Constructor Index

 o de.bb.minissl.SslClient()
Creates a new SslClient object, which uses the given InputStream for reading and the given OutputStream for writing.
 o de.bb.minissl.SslClient(InputStream, OutputStream)
Creates a new SslClient object, which uses the given InputStream for reading and the given OutputStream for writing.

Method Index

 o connect(InputStream, OutputStream)
Connects the current object, which uses the given InputStream for reading and the given OutputStream for writing.
 o getCertificates()
Return the vector of received certificates.
 o getCipherType()
Query the used ciphertype
 o getInputStream()
Returns an input stream for this Ssl connection.
 o getOutputStream()
Returns an input stream for this Ssl connection.

Constructors

 o SslClient
public SslClient()
Creates a new SslClient object, which uses the given InputStream for reading and the given OutputStream for writing. To use this object is must be initialized using the method connect(InputStream is, OutputStream os)

See Also:
connect
 o SslClient
public SslClient(InputStream is,
                 OutputStream os) throws IOException
Creates a new SslClient object, which uses the given InputStream for reading and the given OutputStream for writing.

Parameters:
is - the InputStream, which is used for reading
os - the OutputStream, which is used for writing
Throws: IOException
throws an IOException if any non recoverable error occurs.

Methods

 o connect
public void connect(InputStream is,
                    OutputStream os) throws IOException
Connects the current object, which uses the given InputStream for reading and the given OutputStream for writing.

Parameters:
is - the InputStream, which is used for reading
os - the OutputStream, which is used for writing
Throws: IOException
throws an IOException if any non recoverable error occurs.
 o getCertificates
public final java.util.Vector getCertificates() throws IOException
Return the vector of received certificates. The vector contains elements of byte arrays (byte[]) with each a X.509 certificate. The application must verify the validity of the cerificate(s)!

Returns:
a vector with all received certificates
Throws: IOException
throws an IOException when not connected
 o getCipherType
public int getCipherType() throws IOException
Query the used ciphertype

Returns:
the used ciphertype
  • 3 = SSL_RSA_WITH_RC4_40_MD5
  • 4 = SSL_RSA_WITH_RC4_128_MD5
  • 5 = SSL_RSA_WITH_RC4_128_SHA
Throws: IOException
throws an IOException when not connected
 o getInputStream
public java.io.InputStream getInputStream() throws IOException
Returns an input stream for this Ssl connection.

Returns:
a stream for reading from this Ssl connection.
Throws: IOException
throws an IOException on error
 o getOutputStream
public java.io.OutputStream getOutputStream() throws IOException
Returns an input stream for this Ssl connection.

Returns:
a stream for reading from this Ssl connection.
Throws: IOException
throws an IOException on error

All Packages  Class Hierarchy  This Package  Previous  Next  Index